package com.eet.consumer.consumers;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * 消费者1
 *
 * @author zheng.zhang
 */
@Component
@RabbitListener(queues = "test6.queue")
public class Consumer3 {

    @RabbitHandler
    public void showMsg(String message) {
        System.out.println("Consumer3收到的消息: " + message);
    }

    @RabbitHandler
    public void showMsg(Map<String, Object> map) {
        System.out.println("Consumer3收到的（map）消息如下：" + map);
    }

    @RabbitHandler
    public void showMsg(List<String> list) {
        System.out.println("Consumer3收到的（list）消息如下：" + list);
    }
}
